Skip to content

Deprecate making __debugInfo() nullable#21984

Open
TimWolla wants to merge 1 commit into
php:masterfrom
TimWolla:debuginfo-return-null-deprecate
Open

Deprecate making __debugInfo() nullable#21984
TimWolla wants to merge 1 commit into
php:masterfrom
TimWolla:debuginfo-return-null-deprecate

Conversation

@TimWolla
Copy link
Copy Markdown
Member

@TimWolla TimWolla commented May 8, 2026

Returning null is already deprecated since PHP 8.5 (3dc962b). Not deprecating a corresponding return type seems like an oversight.

Returning `null` is already deprecated since PHP 8.5
(3dc962b). Not deprecating a corresponding
return type seems like an oversight.
@TimWolla TimWolla force-pushed the debuginfo-return-null-deprecate branch from 7b466dd to fb64cbf Compare May 8, 2026 15:08
@DanielEScherzer
Copy link
Copy Markdown
Member

Hmm, so I don't recall if I had looked at this or not at the time - it makes sense, but I wonder if it needs a new RFC (or an entry in the 8.6 deprecations RFC)?

@TimWolla
Copy link
Copy Markdown
Member Author

TimWolla commented May 9, 2026

but I wonder if it needs a new RFC (or an entry in the 8.6 deprecations RFC)?

I'd say it's an obvious follow-up to the existing deprecation. Being able to define a method returns a type, it cannot actually return doesn't make sense.

Copy link
Copy Markdown
Member

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I wonder if it needs a new RFC (or an entry in the 8.6 deprecations RFC)?

I'd say it's an obvious follow-up to the existing deprecation. Being able to define a method returns a type, it cannot actually return doesn't make sense.

Okay, that makes sense - we should still add an UPGRADING note though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants